package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface UserMapper {
    @Select("select * from user where openid=#{openid}")
    User getByOpenid(String openid);
    @Select("select * from user where id=#{id}")
    User getById(Long id);
    void insert(User user);
    @Select("select count(id) from user where create_time > #{orderTime}")
    Integer countByMap(Map map);
    @Select("select count(id) from user where create_time > #{begin}  and create_time < #{end}")
    Integer countByMap1(Map map);
}
